oo::class create CurrentLine {
    variable RenamedPadWidget

    constructor {renamedPadWidget background} {
        set RenamedPadWidget $renamedPadWidget
        $RenamedPadWidget tag configure CurrentLine -background $background
        $RenamedPadWidget tag lower CurrentLine
        $RenamedPadWidget configure -insertofftime 500
    }

    method updateCurrentLine {args} {
        $RenamedPadWidget tag remove CurrentLine 1.0 end
        $RenamedPadWidget tag add CurrentLine "insert linestart" "insert +1l linestart"
    }

    method getPluginEvents {} {
        return {
            {afterReplace updateCurrentLine}
            {afterDelete updateCurrentLine}
            {afterInsert updateCurrentLine}
            {afterMarkSetInsert updateCurrentLine}
        }
    }
}

